package cn.jaye.fabric.controller.rest;

import cn.jaye.fabric.application.CommonApplicationService;
import cn.jaye.fabric.application.command.CommonCommand;
import cn.jaye.fabric.application.command.TestCommand;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2018/6/2.
 */
@RestController
@RequestMapping("common")
public class CommonController {

    @Autowired
    private CommonApplicationService commonApplicationService;

    @PostMapping("request")
    public String common(CommonCommand commonCommand) {
        return JSON.toJSONString(commonApplicationService.list(commonCommand));
    }

}
